Drop wayptc inside waypt_flush.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 18 Jul 2005 17:01:26 +0000 (17:01 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 18 Jul 2005 17:01:26 +0000 (17:01 +0000)
gpsbabel/waypt.c

index 44e9e9ad3e2c8f83950bfabe21cf7818b960a4d3..11eb9e8492b45b7735a8147da4b2e89da7d20132 100644 (file)
@@ -92,7 +92,7 @@ waypt_add(waypoint *wpt)
         * try to be sure that we have these fields even if just by
         * copying them from elsewhere.
         */
-
+#if 0
        if (wpt->shortname == NULL) {
                if (wpt->description) {
                        wpt->shortname = xstrdup(wpt->description);
@@ -117,6 +117,7 @@ waypt_add(waypoint *wpt)
                        }
                }
        }
+#endif
 }
 
 void
@@ -309,6 +310,7 @@ waypt_flush( queue *head )
        QUEUE_FOR_EACH(head, elem, tmp) {
                waypoint *q = (waypoint *) dequeue(elem);
                waypt_free(q);
+               waypt_ct--;
        }
 }